<%@ include file="/WEB-INF/template/include.jsp" %>

<openmrs:require privilege="Manage Privileges" otherwise="/login.htm" redirect="/admin/users/attribute.form" />

<%@ include file="/WEB-INF/template/header.jsp" %>
<%@ include file="localHeader.jsp" %>

<h2>Dynamic Attribute Management</h2>	

<spring:hasBindErrors name="attribute">
	<openmrs:message code="fix.error"/>
	<div class="error">
		<c:forEach items="${errors.allErrors}" var="error">
			<openmrs:message code="${error.code}" text="${error.code}"/><br/><!-- ${error} -->
		</c:forEach>
	</div>
</spring:hasBindErrors>

<form method="post">
	<table>
		<tr>
			<th>Attribute Name</th>
			<td>
				<input type="text" name="attrib_name">
			</td>
		</tr>
		<tr>
			<th>Attribute Type</th>
			<td>
				<select name="attrib_type">
					<option></option>
  					<option value="subject">Subject</option>
  					<option value="action">Action</option>
  					<option value="resource">Resource</option>
				</select> 
			</td>
		</tr>
		<tr>
			<th valign="top">Data Type</th>
			<td valign="top">
				<select name="data_type">
					<option></option>
  					<option value="integer">Integer</option>
  					<option value="long">Long</option>
				</select> 
			</td>
		</tr>
		<tr>
			<th valign="top">User Name</th>
			<td valign="top">
				<input type="text" name="user_name">
			</td>
		</tr>
	</table>
	<input type="submit" value="Save Attribute">
</form>	